3 Programming Interactive Data Visualisation with R 4 Programming Animated Statistical Graphics with R

3.1 Learning Outcome

In this hands-on exercise, you will learn how to create interactive data visualisation by using functions provided by ggiraph and plotlyr packages.

3.2 Getting Started

First, write a code chunk to check, install and launch the following R packages:

  • ggiraph for making ‘ggplot’ graphics interactive.

  • plotly, R library for plotting interactive statistical graphs.

  • DT provides an R interface to the JavaScript library DataTables that create interactive table on html page.

  • tidyverse, a family of modern R packages specially designed to support data science, analysis and communication task including creating static statistical graphs.

  • patchwork for combining multiple ggplot2 graphs into one figure.

The code chunk below will be used to accomplish the task.

pacman::p_load(ggiraph, plotly, 
               patchwork, DT, tidyverse, ggplot2) 

3.3 Importing Data

In this section, Exam_data.csv provided will be used. Using read_csv() of readr package, import Exam_data.csv into R.

The code chunk below read_csv() of readr package is used to import Exam_data.csv data file into R and save it as an tibble data frame called exam_data.

exam_data <- read_csv("C:/Fay1109/ISSS608-VAA/Hands-on_Ex/Hands-on_Ex03/data/Exam_data.csv")
Rows: 322 Columns: 7
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): ID, CLASS, GENDER, RACE
dbl (3): ENGLISH, MATHS, SCIENCE

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

3.4 Interactive Data Visualisation - ggiraph methods

ggiraph is an htmlwidget and a ggplot2 extension. It allows ggplot graphics to be interactive.

Interactive is made with ggplot geometries that can understand three arguments:

  • Tooltip: a column of data-sets that contain tooltips to be displayed when the mouse is over elements.

  • Onclick: a column of data-sets that contain a JavaScript function to be executed when elements are clicked.

  • Data_id: a column of data-sets that contain an id to be associated with elements.

If it used within a shiny application, elements associated with an id (data_id) can be selected and manipulated on client and server sides. Refer to this article for more detail explanation.

3.4.1 Tooltip effect with tooltip aesthetic

Below shows a typical code chunk to plot an interactive statistical graph by using ggiraph package. Notice that the code chunk consists of two parts. First, an ggplot object will be created. Next, girafe() of ggiraph will be used to create an interactive svg object.

p <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(
    aes(tooltip = ID),
    stackgroups = TRUE, 
    binwidth = 1, 
    method = "histodot") +
  scale_y_continuous(NULL, 
                     breaks = NULL)
girafe(
  ggobj = p,
  width_svg = 6,
  height_svg = 6*0.618
)

3.4.2 Displaying multiple information on tooltip

The content of the tooltip can be customised by including a list object as shown in the code chunk below.

exam_data$tooltip <- c(paste0(     
  "Name = ", exam_data$ID,         
  "/n Class = ", exam_data$CLASS)) 

p <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(
    aes(tooltip = exam_data$tooltip), 
    stackgroups = TRUE,
    binwidth = 1,
    method = "histodot") +
  scale_y_continuous(NULL,               
                     breaks = NULL)
girafe(
  ggobj = p,
  width_svg = 8,
  height_svg = 8*0.618
)

3.4.3 Customising Tooltip style

Code chunk below uses opts_tooltip() of ggiraph to customize tooltip rendering by add css declarations.

tooltip_css <- "background-color:white; #<<
font-style:bold; color:black;" #<<

p <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(              
    aes(tooltip = ID),                   
    stackgroups = TRUE,                  
    binwidth = 1,                        
    method = "histodot") +               
  scale_y_continuous(NULL,               
                     breaks = NULL)
girafe(                                  
  ggobj = p,                             
  width_svg = 6,                         
  height_svg = 6*0.618,
  options = list(    #<<
    opts_tooltip(    #<<
      css = tooltip_css)) #<<
)                                        

3.4.4 Displaying statistics on tooltip

Code chunk below shows an advanced way to customise tooltip. In this example, a function is used to compute 90% confident interval of the mean. The derived statistics are then displayed in the tooltip.

tooltip <- function(y, ymax, accuracy = .01) {
  mean <- scales::number(y, accuracy = accuracy)
  sem <- scales::number(ymax - y, accuracy = accuracy)
  paste("Mean maths scores:", mean, "+/-", sem)
}

gg_point <- ggplot(data=exam_data, 
                   aes(x = RACE),
) +
  stat_summary(aes(y = MATHS, 
                   tooltip = after_stat(  
                     tooltip(y, ymax))),  
    fun.data = "mean_se", 
    geom = GeomInteractiveCol,  
    fill = "light blue"
  ) +
  stat_summary(aes(y = MATHS),
    fun.data = mean_se,
    geom = "errorbar", width = 0.2, size = 0.2
  )
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
girafe(ggobj = gg_point,
       width_svg = 8,
       height_svg = 8*0.618)

3.4.5 Hover effect with data_id aesthetic

Code chunk below shows the second interactive feature of ggiraph, namely data_id.

p <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(           
    aes(data_id = CLASS),             
    stackgroups = TRUE,               
    binwidth = 1,                        
    method = "histodot") +               
  scale_y_continuous(NULL,               
                     breaks = NULL)
girafe(                                  
  ggobj = p,                             
  width_svg = 6,                         
  height_svg = 6*0.618                      
)                                        

3.4.6 Styling hover effect

In the code chunk below, css codes are used to change the highlighting effect.

p <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(              
    aes(data_id = CLASS),              
    stackgroups = TRUE,                  
    binwidth = 1,                        
    method = "histodot") +               
  scale_y_continuous(NULL,               
                     breaks = NULL)
girafe(                                  
  ggobj = p,                             
  width_svg = 6,                         
  height_svg = 6*0.618,
  options = list(                        
    opts_hover(css = "fill: #202020;"),  
    opts_hover_inv(css = "opacity:0.2;") 
  )                                        
)                                        

3.4.7 Combining tooltip and hover effect

There are time that we want to combine tooltip and hover effect on the interactive statistical graph as shown in the code chunk below.

p <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(              
    aes(tooltip = CLASS, 
        data_id = CLASS),              
    stackgroups = TRUE,                  
    binwidth = 1,                        
    method = "histodot") +               
  scale_y_continuous(NULL,               
                     breaks = NULL)
girafe(                                  
  ggobj = p,                             
  width_svg = 6,                         
  height_svg = 6*0.618,
  options = list(                        
    opts_hover(css = "fill: #202020;"),  
    opts_hover_inv(css = "opacity:0.2;") 
  )                                        
)                                        

3.4.8 Click effect with onclick

onclick argument of ggiraph provides hotlink interactivity on the web.

The code chunk below shown an example of onclick.

exam_data$onclick <- sprintf("window.open(\"%s%s\")",
"https://www.moe.gov.sg/schoolfinder?journey=Primary%20school",
as.character(exam_data$ID))

p <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(              
    aes(onclick = onclick),              
    stackgroups = TRUE,                  
    binwidth = 1,                        
    method = "histodot") +               
  scale_y_continuous(NULL,               
                     breaks = NULL)
girafe(                                  
  ggobj = p,                             
  width_svg = 6,                         
  height_svg = 6*0.618)                                        

3.4.9 Coordinated Multiple Views with ggiraph

Coordinated multiple views methods has been implemented in the data visualisation below.

Notice that when a data point of one of the dotplot is selected, the corresponding data point ID on the second data visualisation will be highlighted too.

In order to build a coordinated multiple views as shown in the example above, the following programming strategy will be used:

  1. Appropriate interactive functions of ggiraph will be used to create the multiple views.

  2. patchwork function of patchwork package will be used inside girafe function to create the interactive coordinated multiple views.

p1 <- ggplot(data=exam_data, 
       aes(x = MATHS)) +
  geom_dotplot_interactive(              
    aes(data_id = ID),              
    stackgroups = TRUE,                  
    binwidth = 1,                        
    method = "histodot") +  
  coord_cartesian(xlim=c(0,100)) + 
  scale_y_continuous(NULL,               
                     breaks = NULL)

p2 <- ggplot(data=exam_data, 
       aes(x = ENGLISH)) +
  geom_dotplot_interactive(              
    aes(data_id = ID),              
    stackgroups = TRUE,                  
    binwidth = 1,                        
    method = "histodot") + 
  coord_cartesian(xlim=c(0,100)) + 
  scale_y_continuous(NULL,               
                     breaks = NULL)

girafe(code = print(p1 + p2), 
       width_svg = 6,
       height_svg = 3,
       options = list(
         opts_hover(css = "fill: #202020;"),
         opts_hover_inv(css = "opacity:0.2;")
         )
       ) 

The data_id aesthetic is critical to link observations between plots and the tooltip aesthetic is optional but nice to have when mouse over a point.

3.5 Interactive Data Visualisation - plotly methods!

Plotly’s R graphing library create interactive web graphics from ggplot2 graphs and/or a custom interface to the (MIT-licensed) JavaScript library plotly.js inspired by the grammar of graphics. Different from other plotly platform, plot.R is free and open source.

3.5.1 Creating an interactive scatter plot: plot_ly() method

The tabset below shows an example a basic interactive plot created by using plot_ly().

plot_ly(data = exam_data, 
             x = ~MATHS, 
             y = ~ENGLISH)
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plotly.com/r/reference/#scatter
No scatter mode specifed:
  Setting the mode to markers
  Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode

3.5.2 Working with visual variable: plot_ly() method

In the code chunk below, color argument is mapped to a qualitative visual variable (i.e. RACE).

plot_ly(data = exam_data, 
        x = ~ENGLISH, 
        y = ~MATHS, 
        color = ~RACE)
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plotly.com/r/reference/#scatter
No scatter mode specifed:
  Setting the mode to markers
  Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode

3.5.3 Creating an interactive scatter plot: ggplotly() method

The code chunk below plots an interactive scatter plot by using ggplotly().

p <- ggplot(data=exam_data, 
            aes(x = MATHS,
                y = ENGLISH)) +
  geom_point(size=1) +
  coord_cartesian(xlim=c(0,100),
                  ylim=c(0,100))
ggplotly(p)

3.5.4 Coordinated Multiple Views with plotly

The creation of a coordinated linked plot by using plotly involves three steps:

  • highlight_key() of plotly package is used as shared data.

  • two scatterplots will be created by using ggplot2 functions.

  • lastly, subplot() of plotly package is used to place them next to each other side-by-side.

d <- highlight_key(exam_data)
p1 <- ggplot(data=d, 
            aes(x = MATHS,
                y = ENGLISH)) +
  geom_point(size=1) +
  coord_cartesian(xlim=c(0,100),
                  ylim=c(0,100))

p2 <- ggplot(data=d, 
            aes(x = MATHS,
                y = SCIENCE)) +
  geom_point(size=1) +
  coord_cartesian(xlim=c(0,100),
                  ylim=c(0,100))
subplot(ggplotly(p1),
        ggplotly(p2))

3.6 Interactive Data Visualisation - crosstalk methods!

Crosstalk is an add-on to the htmlwidgets package. It extends htmlwidgets with a set of classes, functions, and conventions for implementing cross-widget interactions (currently, linked brushing and filtering).

3.6.1 Interactive Data Table: DT package

DT::datatable(exam_data, class= "compact")

3.6.2 Linked brushing: crosstalk method

d <- highlight_key(exam_data) 
p <- ggplot(d, 
            aes(ENGLISH, 
                MATHS)) + 
  geom_point(size=1) +
  coord_cartesian(xlim=c(0,100),
                  ylim=c(0,100))

gg <- highlight(ggplotly(p),        
                "plotly_selected")  

crosstalk::bscols(gg,               
                  DT::datatable(d), 
                  widths = 5)        
Setting the `off` event (i.e., 'plotly_deselect') to match the `on` event (i.e., 'plotly_selected'). You can change this default via the `highlight()` function.

3.7 Reference

3.7.1 ggiraph

This link provides online version of the reference guide and several useful articles. Use this link to download the pdf version of the reference guide.

3.7.2 plotly for R

4.1 Overview

When telling a visually-driven data story, animated graphics tends to attract the interest of the audience and make deeper impression than static graphics. In this hands-on exercise, you will learn how to create animated data visualisation by using gganimate and plotly r packages. At the same time, you will also learn how to (i) reshape data by using tidyr package, and (ii) process, wrangle and transform data by using dplyr package.

4.1.1 Basic concepts of animation

When creating animations, the plot does not actually move. Instead, many individual plots are built and then stitched together as movie frames, just like an old-school flip book or cartoon. Each frame is a different plot when conveying motion, which is built using some relevant subset of the aggregate data. The subset drives the flow of the animation when stitched back together.

4.1.2 Terminology

Before we dive into the steps for creating an animated statistical graph, it’s important to understand some of the key concepts and terminology related to this type of visualization.

  1. Frame: In an animated line graph, each frame represents a different point in time or a different category. When the frame changes, the data points on the graph are updated to reflect the new data.

  2. Animation Attributes: The animation attributes are the settings that control how the animation behaves. For example, you can specify the duration of each frame, the easing function used to transition between frames, and whether to start the animation from the current frame or from the beginning.

4.2 Getting Started

4.2.1 Loading the R packages

pacman::p_load(readxl, gifski, gapminder,
               plotly, gganimate, tidyverse)

4.2.2 Importing the data

In this hands-on exercise, the Data worksheet from GlobalPopulation Excel workbook will be used.

Write a code chunk to import Data worksheet from GlobalPopulation Excel workbook by using appropriate R package from tidyverse family.

col <- c("Country", "Continent")
globalPop <- read_xls("C:/Fay1109/ISSS608-VAA/Hands-on_Ex/Hands-on_Ex03/data/GlobalPopulation.xls",sheet="Data") %>%
  mutate_each_(funs(factor(.)), col) %>%
  mutate(Year = as.integer(Year))
Warning: `mutate_each_()` was deprecated in dplyr 0.7.0.
ℹ Please use `across()` instead.
Warning: `funs()` was deprecated in dplyr 0.8.0.
ℹ Please use a list of either functions or lambdas:

# Simple named list: list(mean = mean, median = median)

# Auto named with `tibble::lst()`: tibble::lst(mean, median)

# Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))

4.3 Animated Data Visualisation: gganimate methods

gganimate extends the grammar of graphics as implemented by ggplot2 to include the description of animation. It does this by providing a range of new grammar classes that can be added to the plot object in order to customise how it should change with time.

  • transition_*() defines how the data should be spread out and how it relates to itself across time.

  • view_*() defines how the positional scales should change along the animation.

  • shadow_*() defines how data from other points in time should be presented in the given point in time.

  • enter_*()/exit_*() defines how new data should appear and how old data should disappear during the course of the animation.

  • ease_aes() defines how different aesthetics should be eased during transitions.

4.3.1 Building a static population bubble plot

ggplot(globalPop, aes(x = Old, y = Young, 
                      size = Population, 
                      colour = Country)) +
  geom_point(alpha = 0.7, 
             show.legend = FALSE) +
  scale_colour_manual(values = country_colors) +
  scale_size(range = c(2, 12)) +
  labs(title = 'Year: {frame_time}', 
       x = '% Aged', 
       y = '% Young') 

4.3.2 Building the animated bubble plot

ggplot(globalPop, aes(x = Old, y = Young, 
                      size = Population, 
                      colour = Country)) +
  geom_point(alpha = 0.7, 
             show.legend = FALSE) +
  scale_colour_manual(values = country_colors) +
  scale_size(range = c(2, 12)) +
  labs(title = 'Year: {frame_time}', 
       x = '% Aged', 
       y = '% Young') +
  transition_time(Year) +       
  ease_aes('linear')          

4.4 Animated Data Visualisation: plotly

In Plotly R package, both ggplotly() and plot_ly() support key frame animations through the frame argument/aesthetic. They also support an ids argument/aesthetic to ensure smooth transitions between objects with the same id (which helps facilitate object constancy).

4.4.1 Building an animated bubble plot: ggplotly() method

In this sub-section, you will learn how to create an animated bubble plot by using ggplotly() method.

gg <- ggplot(globalPop, 
       aes(x = Old, 
           y = Young, 
           size = Population, 
           colour = Country)) +
  geom_point(aes(size = Population,
                 frame = Year),
             alpha = 0.7, 
             show.legend = FALSE) +
  scale_colour_manual(values = country_colors) +
  scale_size(range = c(2, 12)) +
  labs(x = '% Aged', 
       y = '% Young')
Warning in geom_point(aes(size = Population, frame = Year), alpha = 0.7, :
Ignoring unknown aesthetics: frame
ggplotly(gg)
Warning in p$x$data[firstFrame] <- p$x$frames[[1]]$data: number of items to
replace is not a multiple of replacement length

4.4.2 Building an animated bubble plot: plot_ly() method

In this sub-section, you will learn how to create an animated bubble plot by using plot_ly() method.

bp <- globalPop %>%
  plot_ly(x = ~Old, 
          y = ~Young, 
          size = ~Population, 
          color = ~Continent, 
          frame = ~Year, 
          text = ~Country, 
          hoverinfo = "text",
          type = 'scatter',
          mode = 'markers'
          )
bp
Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

Warning: `line.width` does not currently support multiple values.

4.5 Reference